package com.example.mypage

import android.os.Bundle
import android.util.Log
import android.widget.Button
import android.widget.TextView
import androidx.appcompat.app.AppCompatActivity
import com.example.base.base.activity.BaseActivity
import com.therouter.TheRouter
import com.therouter.router.Autowired
import com.therouter.router.Route

@Route(path = "http://bdnrc.org.cn/mypage", description = "我的主页")
class MyPageActivity : BaseActivity() {
    companion object{
        private const val TAG = "MyPageActivity"
    }

    @Autowired
    lateinit var keyString: String
    override fun init() {
        findViewById<Button>(R.id.gotoUnity).setOnClickListener {
            TheRouter.build("http://bdnrc.org.cn/unity")
                .navigation(this)
        }
    }

    override fun setContentView() {
        setContentView(R.layout.activity_my_page)

    }


    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        Log.v(TAG, "MyPage onCreate()...")

//        findViewById<TextView>(R.id.text2).text = keyString
//        findViewById<TextView>(R.id.text3).text = keyBoolean.toString()


    }

    override fun onRestart() {
        super.onRestart()
        Log.v(TAG, "MyPage onRestart()...")
    }

    override fun onStart() {
        super.onStart()
        Log.v(TAG, "MyPage onStart()...")
    }

    override fun onResume() {
        super.onResume()
        Log.v(TAG, "MyPage onResume()...")

    }

    override fun onPause() {
        super.onPause()
        Log.v(TAG, "MyPage onPause()...")

    }

    override fun onStop() {
        super.onStop()
        Log.v(TAG, "MyPage onStop()...")

    }

    override fun onDestroy() {
        super.onDestroy()
        Log.v(TAG, "MyPage onDestroy()...")

    }
}